/**
 * @license
 * Copyright 2024 The Model Explorer Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ==============================================================================
 */

@use '../../theme/colors';

// Theme variables.
//
// Needs to match the theme variables in theme.scss.
:host[data-metheme='light'],
::ng-deep body,
::ng-deep body[data-metheme='light'] {
  color-scheme: light;

  @include colors.light-colors;
}

:host[data-metheme='dark'],
::ng-deep body[data-metheme='dark'] {
  color-scheme: dark;

  @include colors.dark-colors;
}

.container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;

  benchmark-runner {
    flex-grow: 1;
  }

  title-bar {
    height: 48px;
    min-height: 48px;
  }

  .main {
    flex-grow: 1;
    display: flex;
    position: relative;
    overflow: hidden;

    .no-graphs-message {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--me-on-surface-variant-color);
    }

    split-panes-container {
      flex-grow: 1;
    }

    graph-selector {
      position: absolute;
      top: 12px;
      left: 12px;
      z-index: 100;
    }
  }
}

// Global rules.
::ng-deep {
  .model-explorer-help-popup {
    font-size: 12px;
    padding: 8px;
    background-color: var(--me-surface-container-low-color);
    line-height: normal;
    color: var(--me-on-surface-color);

    .bold {
      font-weight: 700;
    }

    .shortcut {
      display: flex;
      align-items: center;
      color: var(--me-on-surface-variant-color);
      margin-top: 8px;

      mat-icon {
        font-size: 20px;
        width: 20px;
        height: 20px;
        margin-right: 2px;
        color: var(--me-on-surface-variant-color);
      }
    }

    .description {
      color: var(--me-on-surface-variant-color);
      margin-top: 8px;
    }
  }

  .mat-mdc-tooltip-surface {
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    background-color: var(--me-tooltip-bg-color) !important;
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    color: var(--me-on-surface-inverse-color) !important;
  }

  .mat-mdc-dialog-surface {
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    background-color: var(--me-surface-container-low-color) !important;
  }

  .mat-mdc-snackbar-surface {
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    background-color: var(--me-tooltip-bg-color) !important;
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    color: var(--me-on-surface-inverse-color) !important;

    button {
      /* stylelint-disable-next-line declaration-no-important -- override MDC */
      color: var(--me-primary-inverse-color) !important;
    }
  }
}
